﻿using NodeEditor;

namespace ETHotfix
{
    [NodeEvent(typeof(GetIntNode))]
    public class GetIntNodeHandle : NodeHandle<GetIntNode>
    {
        const string valueStr = "value";
        protected override void OnHandle(RuntimeTree runtimeTree, RuntimeNode runtimeNode, GetIntNode data, Unit unit)
        {
            data.value = runtimeTree.runtimeValue.GetValue(data.key, data.value);
            runtimeNode.SetOutputValue(valueStr, data.value);
        }
    }
}